package cn.hzc.fortess.system.service;

import cn.hzc.fortess.system.entity.Project;
import cn.hzc.fortess.system.entity.Role;
import cn.hzc.fortess.system.page.Pagination;
import cn.hzc.fortess.system.search.RoleSearch;
import cn.hzc.fortess.system.vo.ResourceAttrVO;

import java.util.List;

public interface RoleService {

    void add(Role entity);

    void update(Role entity);

    void delete(Integer id);

    Role getById(Integer id);

    List<Role> getByUser(Integer userId);

    List<Role> getByProjectId(Integer projectId);

    Pagination getPage(RoleSearch search);

    void deleteByProject(Integer projectId);

    void createAdminRole4Project(Project project);

    void setAuthority(Integer roleId, String[] menuIds);

    void saveRoleUser(Integer roleId, String[] userIds);

    void setDataAuthority(Integer roleId, List<ResourceAttrVO> attrs);

    List<String> findMenuPermissionListByRoleIds(List<Integer> roleIds);


}
